package mi.payment.ui.other;

import android.os.Bundle;
import android.view.View;

import mi.payment.R;
import mi.payment.ui.admin.DownloadManagementActivity;
import mi.payment.ui.base.BaseInputAdminPwdActivity;

/**
 * 终端参数下载校验管理员密码界面
 *
 * @author Created by shz on 2017/9/20.
 */

public class ParamsDownloadAdminPwd extends BaseInputAdminPwdActivity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setAutoFinish(false);
        initData();
    }

    private void initData() {
        cardNumber.setVisibility(View.GONE);
        cardMoney.setVisibility(View.GONE);
        cardTime.setVisibility(View.GONE);
        cardProof.setVisibility(View.GONE);
        cardRefer.setVisibility(View.GONE);
        transactionType.setVisibility(View.GONE);
        ensureData.setVisibility(View.GONE);
        String str = getString(R.string.download_function);
        title.setTitleText(str);
    }

    @Override
    public void clickListener() {
        boolean right = isPasswordRight();
        if (right) {
            openActivity(DownloadManagementActivity.class);
            finish();
        } else {
            passwordInputView.clearText();
            showToast(R.string.password_wrong);
        }
    }


}
